package com.blrs.service.questionnaire.impl;

import java.util.List;

import com.blrs.service.questionnaire.IQuestionnaireAnswersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.blrs.mapper.QuestionnaireAnswersMapper;
import com.blrs.domain.QuestionnaireAnswers;

/**
 * 问卷答案Service业务层处理
 * 
 * @author yang
 * @date 2023-11-28
 */
@Service
public class QuestionnaireAnswersServiceImpl implements IQuestionnaireAnswersService
{
    @Autowired
    private QuestionnaireAnswersMapper questionnaireAnswersMapper;

    /**
     * 查询问卷答案
     * 
     * @param solutionId 问卷答案主键
     * @return 问卷答案
     */
    @Override
    public QuestionnaireAnswers selectQuestionnaireAnswersBySolutionId(Long solutionId)
    {
        return questionnaireAnswersMapper.selectQuestionnaireAnswersBySolutionId(solutionId);
    }

    /**
     * 查询问卷答案列表
     * 
     * @param questionnaireAnswers 问卷答案
     * @return 问卷答案
     */
    @Override
    public List<QuestionnaireAnswers> selectQuestionnaireAnswersList(QuestionnaireAnswers questionnaireAnswers)
    {
        return questionnaireAnswersMapper.selectQuestionnaireAnswersList(questionnaireAnswers);
    }

    /**
     * 新增问卷答案
     * 
     * @param questionnaireAnswers 问卷答案
     * @return 结果
     */
    @Override
    public int insertQuestionnaireAnswers(QuestionnaireAnswers questionnaireAnswers)
    {
        return questionnaireAnswersMapper.insertQuestionnaireAnswers(questionnaireAnswers);
    }

    /**
     * 修改问卷答案
     * 
     * @param questionnaireAnswers 问卷答案
     * @return 结果
     */
    @Override
    public int updateQuestionnaireAnswers(QuestionnaireAnswers questionnaireAnswers)
    {
        return questionnaireAnswersMapper.updateQuestionnaireAnswers(questionnaireAnswers);
    }

    /**
     * 批量删除问卷答案
     * 
     * @param solutionIds 需要删除的问卷答案主键
     * @return 结果
     */
    @Override
    public int deleteQuestionnaireAnswersBySolutionIds(Long[] solutionIds)
    {
        return questionnaireAnswersMapper.deleteQuestionnaireAnswersBySolutionIds(solutionIds);
    }

    /**
     * 删除问卷答案信息
     * 
     * @param solutionId 问卷答案主键
     * @return 结果
     */
    @Override
    public int deleteQuestionnaireAnswersBySolutionId(Long solutionId)
    {
        return questionnaireAnswersMapper.deleteQuestionnaireAnswersBySolutionId(solutionId);
    }
}
